<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/taglib.jsp"%>
<jsp:include page="/WEB-INF/common/head.jsp" flush="true" />
 <div class="easyui-panel addPage" data-options="fit:true,border:false,novalidate:true">
    <form class="easyui-form" id="ff" method="post" data-options="novalidate:true">
        <table class="table1">
        	
            <tr>
           		<th><span>用户：</span></th>
               	<td>
               		<input id = "ids" name="ids" type="hidden" value="${ids}"/>
               		<div class="wrap_input"><input class="easyui-textbox" id="name" type="text" name="name" value="${item.id}" data-options="fit:true, required:true"></input></div>
           		</td>
           	</tr>
        </table>
    </form>
</div>
	<script type="text/javascript">
		
	top.window.subPage.save = save;
	function save() {
		if($("#ff").form('enableValidation').form('validate')) {
			$.post("${context_path}/sys/obj/objAddUser", getParam(), function(data) {
				top.window.closeWindow();
				top.window.subPage.loadCurrDatagrid();
			});
		}
	}
	function getParam() {
		var param = {
	       	    "userId": $(":input[name='name']").val(),
	       	    "ids": $("#ids").val()
		}
		for(key in param) {
			if(!param[key]) {
				delete param[key];
			}
		}
		return param;
	}
	
	function getAllUsertList(){
		$.post("${context_path}/sys/user/getAllUsertList", {}, function(data) {
			if(data.code==0){
				$("#name").combobox({
					data: data.data,
					valueField: 'id',
                    textField: 'text'
				});
			}
		});
	}
	$(function() {
		//handleAuthDataRule();
		getAllUsertList();
	});

		</script>
  <jsp:include page="/WEB-INF/common/dialogWindow.jsp" flush="true" />
   <jsp:include page="/WEB-INF/common/foot.jsp" flush="true" />
